<!DOCTYPE html>
<title>media controls cast button low end device</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../media-controls.js"></script>
<script src="../remoteplayback/util.js"></script>
<video width="500"></video>
<script>
async_test(function(t) {
    setIsLowEndDeviceForTest(t);
    enableRemotePlaybackBackendForTest(t);

    var video = document.querySelector("video");
    video.controls = true;

    // No idea why waiting for the metadata to load is needed (or a couple
    // of timeouts) since the button should show with the rest of the
    // controls with no need for metadata.
    // NOTE: shouldn't report the availability as true unless there's a URL
    // to fling.
    video.onloadedmetadata = t.step_func_done(_ => {
      assert_true(isCastButtonEnabled(video));
    });

    video.src = "../content/test.ogv";
});
</script>
